﻿/*
 * Copyright (C) 2014 Cypress Data Defense, LLC    
 * oss@cypressdefense.com
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
*/

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CypressDefense.Security.Shim.Configuration.Hsts
{
    public class StrictTransportSecurityElement : Base.HeaderBase
    {
        [ConfigurationProperty("maxAge", IsRequired = false, DefaultValue = 31536000)]
        [IntegerValidator(MinValue = 1, MaxValue = Int32.MaxValue)]
        public int MaxAge
        {
            get
            {
                return (int)this["maxAge"];
            }
            set
            {
                this["maxAge"] = value;
            }
        }

        [ConfigurationProperty("includeSubDomains", IsRequired = false, DefaultValue = true)]
        public bool IncludeSubDomains
        {
            get
            {
                return (bool)this["includeSubDomains"];
            }
            set
            {
                this["includeSubDomains"] = value;
            }
        }
    }
}
